package dk.dashboardFP.panels.textPanel {
	import dk.dashboardFP.core.DashboardFPCore;
	import dk.dashboardFP.panels.subPanels.ui.windowSubPanelUI.WindowSubPanelUI;
	import dk.dashboardFP.panels.tempPanel.AbstractTempWindowPanel;

	/**
	 * @author josef
	 */
	public class TextPanel extends AbstractTempWindowPanel {
		private var _oWindow : TextWindowSubPanel;
		private var _windowContent : TextWindowContent;

		public function TextPanel(doDashboardFPCore : DashboardFPCore, sPanelName : String) {
			super(doDashboardFPCore, sPanelName);
		}

		public function showInfo(data : String) : void {
			_windowContent.text = data;
		}

		override protected function createPanelElements() : void {
			
			_oWindow = new TextWindowSubPanel(this, "Info");
			addSubPanel(_oWindow);
			
			// setupu window content 
			_windowContent=new TextWindowContent();
			
			(_oWindow.doSubPanelUI as WindowSubPanelUI).addWindowContent(_windowContent);
		}
	}
}
